
#include "para_pars.h"

static int rkmpp_player_help(void)
{
	log_i("******************************************************\n");
	log_i("Usage: rkmpp_player\n");
	log_i("argv[1]: set video path,0-home,1-10,2-fave\n");
	log_i("argv[2]: set system volume\n");
	log_i("argv[3]: set video  decode time\n");
	log_i("argv[4]: set video  play index\n");

	

	log_i("******************************************************\n");

	return 0;
}


int parameter_parsing(int argc, char *argv[])
{
	int i = 0;
	int j = 0;

	char volume     = 0;
	char video_path = 0;
	int  de_time    = 0;
	int  play_index = 0;
	//****************************************************
	log_i("******************************************************\n");
	log_i("argc=%d\n",argc);
	//****************************************************
	for(i=0;i<argc;i++)
	{
		log_i("argv[%d]=%s\n",i,argv[i]);

		switch(i){
		case CONFIG_PARA_VIDEO_PATH:
		{
			video_path = atoi(argv[i]);
			video_para_set_path(video_path);
			log_i("video_path=%d\n",video_path);
			break;
		}
		case CONFIG_PARA_VOLUME:
		{
			volume = atoi(argv[i]);
			audio_para_set_volume(volume);
			log_i("volume=%d\n",volume);
			break;
		}
		case CONFIG_PARA_VIDEO_DETIME:
		{
			de_time = atoi(argv[i]);
			video_para_set_detime(de_time);
			log_i("de_time=%d\n",de_time);
			break;
		}
		case CONFIG_PARA_VIDEO_INDEX:
		{
			play_index = atoi(argv[i]);
			video_para_set_playindex(play_index);
			log_i("play_index=%d\n",play_index);
			break;
		}
		default:break;
		}
	}
	//****************************************************
	rkmpp_player_help();
	//****************************************************
	
	system_para_config();
	//****************************************************

	

	return 0;
}









